import React from 'react'
import Svg, { Path, G } from 'react-native-svg'
import { Animated } from 'react-native'
import { useAnimated } from './hooks'
import { IconsProps } from './'
const AnimatedPath = Animated.createAnimatedComponent(Path)
const AnimatedG = Animated.createAnimatedComponent(G)
/**
 * @description: 星
 */
export default (props: IconsProps & { checkColor?: string }) => {
  const {
    color = '#B9B9B9',
    checkColor = '#FA6400',
    size = 20,
    visible = false,
  } = props
  const { fadeAnim } = useAnimated({ visible })
  return (
    <Svg height={size} width={size} viewBox={`0 0 20 20`} fill="none">
      <AnimatedG fill="none">
        <AnimatedPath
          stroke={visible ? checkColor : color}
          strokeWidth="2"
          fill={visible ? checkColor : 'none'}
          // opacity={fadeAnim}
          d="M10.0093224,1.00612033 C10.0849691,1 10.1241314,1.03453554 10.1604125,1.07257861 C10.3995146,1.32329285 10.5633415,1.72068016 10.7732582,2.16164831 C11.2861842,3.23914277 11.9359407,4.54364865 13.2819392,5.56369575 C14.5810924,6.54824174 16.0126985,6.88722513 17.2380459,7.15637196 C17.9572268,7.31433964 18.7603637,7.27512887 18.9897561,7.86348179 C18.9901878,7.86458923 18.9961038,7.86711908 18.9945625,7.86955955 C18.827474,8.13411292 18.4814687,8.34858652 18.1116678,8.62121938 C17.0470224,9.40612086 15.7522669,10.4176133 15.1864195,12.2341238 C14.652049,13.9495853 15.0072826,15.5862157 15.3438147,16.9757724 C15.4880664,17.5713943 15.6375052,18.1045324 15.6104259,18.5537337 C15.6029624,18.6775417 15.5822148,18.7959789 15.4818732,18.8839646 C15.427749,18.9314241 15.3727763,18.949389 15.3113319,18.9383577 C14.9475994,18.8730553 14.5652168,18.6007907 14.1182799,18.3264799 C13.0306894,17.6589635 11.7117356,16.8949552 10.0245561,16.8949552 C8.3573917,16.8949552 7.08914454,17.6695461 6.0306117,18.3580393 C5.59229573,18.6431297 5.21725605,18.9331704 4.84299449,18.9948284 C4.74411042,19.0111191 4.65814116,18.9636732 4.56723905,18.8839646 C4.42569237,18.7598478 4.37486024,18.6074589 4.36295688,18.4399463 C4.32894452,17.9612998 4.49699978,17.4081315 4.65602511,16.7981758 C5.01113413,15.4361237 5.37332364,13.8733754 4.86269278,12.2341238 C4.32394565,10.504612 3.03113434,9.52921179 1.93990019,8.76156818 C1.54643842,8.4847821 1.16963039,8.27129129 1.00225676,7.98992812 C0.989578143,7.96861475 1.02258002,7.94685139 1.0305529,7.93010576 C1.36466912,7.22835343 2.32968058,7.24158771 3.23092086,7.07160022 C4.57008313,6.81901405 6.05832529,6.50527599 7.30078321,5.56369575 C8.67717457,4.52061584 9.19621207,3.13595091 9.5880526,1.99992105 C9.72627943,1.59917179 9.8206987,1.23460253 10.0093224,1.00612033 Z"
        />
        <AnimatedPath
          fill={checkColor}
          opacity={fadeAnim}
          d="M10.0093224,1.00612033 C10.0849691,1 10.1241314,1.03453554 10.1604125,1.07257861 C10.3995146,1.32329285 10.5633415,1.72068016 10.7732582,2.16164831 C11.2861842,3.23914277 11.9359407,4.54364865 13.2819392,5.56369575 C14.5810924,6.54824174 16.0126985,6.88722513 17.2380459,7.15637196 C17.9572268,7.31433964 18.7603637,7.27512887 18.9897561,7.86348179 C18.9901878,7.86458923 18.9961038,7.86711908 18.9945625,7.86955955 C18.827474,8.13411292 18.4814687,8.34858652 18.1116678,8.62121938 C17.0470224,9.40612086 15.7522669,10.4176133 15.1864195,12.2341238 C14.652049,13.9495853 15.0072826,15.5862157 15.3438147,16.9757724 C15.4880664,17.5713943 15.6375052,18.1045324 15.6104259,18.5537337 C15.6029624,18.6775417 15.5822148,18.7959789 15.4818732,18.8839646 C15.427749,18.9314241 15.3727763,18.949389 15.3113319,18.9383577 C14.9475994,18.8730553 14.5652168,18.6007907 14.1182799,18.3264799 C13.0306894,17.6589635 11.7117356,16.8949552 10.0245561,16.8949552 C8.3573917,16.8949552 7.08914454,17.6695461 6.0306117,18.3580393 C5.59229573,18.6431297 5.21725605,18.9331704 4.84299449,18.9948284 C4.74411042,19.0111191 4.65814116,18.9636732 4.56723905,18.8839646 C4.42569237,18.7598478 4.37486024,18.6074589 4.36295688,18.4399463 C4.32894452,17.9612998 4.49699978,17.4081315 4.65602511,16.7981758 C5.01113413,15.4361237 5.37332364,13.8733754 4.86269278,12.2341238 C4.32394565,10.504612 3.03113434,9.52921179 1.93990019,8.76156818 C1.54643842,8.4847821 1.16963039,8.27129129 1.00225676,7.98992812 C0.989578143,7.96861475 1.02258002,7.94685139 1.0305529,7.93010576 C1.36466912,7.22835343 2.32968058,7.24158771 3.23092086,7.07160022 C4.57008313,6.81901405 6.05832529,6.50527599 7.30078321,5.56369575 C8.67717457,4.52061584 9.19621207,3.13595091 9.5880526,1.99992105 C9.72627943,1.59917179 9.8206987,1.23460253 10.0093224,1.00612033 Z"
        />
      </AnimatedG>
    </Svg>
  )
}
